/* eslint-disable no-unused-expressions */
import { defineStore } from 'pinia'

const useUserInfoStore = defineStore('userInfo', {
  state: () => ({
    userInfo: {
      userId: '',
    } as any,
    detailData: {},
  }),
  getters: {
    getUserInfo(): any {
      return this.userInfo
    },
    getDetailData(): any {
      return this.detailData
    },
  },
  actions: {
    setUserInfo(userInfo: any): void {
      this.userInfo = userInfo
    },
    setDetailData(detailData: any): void {
      this.detailData = detailData
    },
  },
})

export default useUserInfoStore
